package org.example.demoblg.serviser;

import org.example.demoblg.mapper.UserInfo;
import org.example.demoblg.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ServicerUse {
    @Autowired
    private UserInfo userInfo;
   public User getNameById(Integer id){
       return userInfo.getNameById(id);
   }

   public User getNameByName(String userName)
   {
       return userInfo.getNameByName(userName);
   }
   public Integer enroll(User user){
       return userInfo.insert(user);
   }
}
